Skip to content

Conversation

@surma
Copy link

@surma surma commented Jan 6, 2026

I don't know if you all have any interest in this, but I whipped this up because I really enjoy the simplicity of this flag in Claude Code.

So this adds a CLI flag and environment variable to bypass all permission prompts, similar to Claude Code's implementation.

Happy to take feedback or just throw this away if you don't think this is the right approach.

Usage

# CLI flag
opencode --dangerously-skip-permissions

# Environment variable
OPENCODE_DANGEROUSLY_SKIP_PERMISSIONS=true opencode

# With run command
opencode run --dangerously-skip-permissions "do something"

Behavior

  • Skips all ask permission prompts (auto-allows)
  • deny rules still apply (explicit denies are respected)
  • Shows "△ YOLO mode" warning in the TUI (home screen, footer, and sidebar)

Changes

  • flag.ts: Add OPENCODE_DANGEROUSLY_SKIP_PERMISSIONS env var
  • permission/next.ts: Add skipPermissions state and bypass logic in ask()
  • run.ts: Add --dangerously-skip-permissions option
  • thread.ts: Add --dangerously-skip-permissions option, propagate to TUI via args
  • args.tsx: Add dangerouslySkipPermissions to Args interface
  • home.tsx, footer.tsx, sidebar.tsx: Show warning indicator when enabled

Fixes #8463

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

# Conflicts:
#	packages/opencode/src/cli/cmd/tui/routes/home.tsx
#	packages/opencode/src/cli/cmd/tui/thread.ts
@surma surma force-pushed the surma/skip-permissions branch from 9b84229 to e6ed117 Compare January 14, 2026 14:23
@github-actions
Copy link
Contributor

Hey! Your PR title Implement --dangerously-skip-permissions aka YOLO mode doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@surma surma changed the title Implement --dangerously-skip-permissions aka YOLO mode feat: add --dangerously-skip-permissions flag Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add --dangerously-skip-permissions (aka YOLO mode)

1 participant